<template>
  <div>
      <div v-for="(v,i) in arr" :key="i" @click="fun(i)">
            <hotmovielists :moviename="arr[i].name" :movieimg="arr[i].url" :point="arr[i].point" :actor="arr[i].stars" :num1="arr[i].num1" :num2="arr[i].num2"/>
      </div>
    
  </div>
</template>

<script>
import hotmovielists from "com/hotmovielists.vue"
import {getdata} from "@/api/getapi.js"
export default {
    components:{
        hotmovielists
    },
     data() {
        return {
            arr:[]
        }
    },
    methods: {
        fun(i){
            this.$router.push({name:"Tiket",params:{tiketname:this.arr[i]}})
        }
    },
    mounted() {
        getdata("/data/list").then((ok)=>{
            console.log(ok);
            this.arr=ok.data.arr
            console.log(ok.data.arr[0].url)
            
        })
    },
}
</script>

<style scoped>
    div{
        padding: 0px 10px;
    }
</style>